package com.baiduspring.utils.security;

public interface BaseSecurity {
    default void forencode(StringBuffer encode, byte[] md5Bytes) {
        for (int i = 0; i < md5Bytes.length; i++) {
            int val = ((int) md5Bytes[i]) & 0xff;
            if (val < 16) {
                encode.append("0");
            }
            encode.append(Integer.toHexString(val));
        }
    }
}
